home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 47.7z / BS1 part 47 / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 6 of 7)[HD].7z / ImageMaster RT v1.50b (1994)(Black Belt Systems)(Disk 6 of 7)[HD].adf / piarc.lzh.parta / neo.rexx < prev    next >
OS/2 REXX Batch file  |  1994-03-17  |  2KB  |  77 lines

  1. /*
  2.  * NEO.rexx   -  NEOChrome (Atari) file loader
  3.  *               Loads NEOChrome files
  4.  *                 *.NEO
  5.  *
  6.  *  Written by: Pete Patterson
  7.  * Last Update: Sept. 3, 1993
  8.  *    Revision: 1.00
  9.  *         For: Black Belt Systems image processing series IM, IM F/c, and IP.
  10.  * ---------------------------------------------------------------------------
  11.  *    Revision: 1.00 - see ReadMe file for details on changes to this level
  12.  *
  13.  *        1.00  03 Sept. 1993  (BC)
  14.  */
  15.  
  16. /*
  17.  * open rexxsupport.library -- needed for some functions
  18.  */
  19. if ~show('L',"rexxsupport.library") then do
  20.   if addlib('rexxsupport.library',0,-30,0) then do
  21.       /* everything's ok */
  22.     end;
  23.   else do
  24.     say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
  25.     say 'Cannot operate  without this library - sorry!';
  26.     exit 10;
  27.     end;
  28.   end;
  29.  
  30.  
  31.   /*
  32.    * This code attempts to read a file called "picmdpath" from REXX:
  33.    * If it can't find it, the script will assume that the commands
  34.    * associated with this PI Module are in "c:". If the file exists,
  35.    * the script will look in the path that is specified in the file.
  36.    * If you create this file, you MUST put a complete, correct path
  37.    * in it; if the commands are in a sub-directory, you have to put
  38.    * the trailing slash on the path (like, device:dir/).
  39.    * 
  40.    */
  41.   cmdpath = 'c:';
  42.   if open(fhandle,'rexx:picmdpath','read') then  /* open the file */
  43.     do
  44.       cmdpath = readln(fhandle);
  45.       call close(fhandle);  /* close the file    */
  46.     end
  47.  
  48. prtnme = 'IM_Port';
  49. address(prtnme);
  50.  
  51. path = 'ram:';
  52. name = '';
  53. ext  = '';
  54.  
  55.   options results;
  56.   'filerequest "'||path||'","'||name||'","'||ext||'","Load NEOChrome"';
  57.   neofile = result;
  58.   options;
  59.  
  60.   if neofile = 'FR_CANCELLED' then do
  61.     address(prtnme);
  62.     'imtofront';
  63.     exit 0;
  64.     end;
  65.  
  66.   address(prtnme);
  67.   options results;
  68.   'jackin';
  69.   jackadr = result;
  70.   options;
  71.  
  72.   'autoredraw 0';
  73.   address command cmdpath||'neo '||jackadr||' 0 '||neofile;
  74.   'autoredraw 1';
  75.   exit 0;
  76. end
  77.